<template>
  <div class="container">
    <topTitle :titleText="titleText"></topTitle>
    <div class="mainCon">
      <div class="listDetail">
        <p class="listDetailTitle">网点信息</p>
        <el-row class="listDetailInfo">
          <el-col :span="12">网点名称：{{ detailInfo.name }}</el-col>
          <el-col :span="11" :offset="1"
            >网点电话：{{ detailInfo.telAreaCode }}-{{
              detailInfo.telNumber
            }}</el-col
          >
          <el-col :span="24">网点地址：{{ detailInfo.address }}</el-col>
          <el-col :span="12">负责人：{{ detailInfo.manager }}</el-col>
          <el-col :span="11" :offset="1"
            >联系电话：{{ detailInfo.managerTel }}</el-col
          >
        </el-row>
      </div>
      <div class="listDetail">
        <p class="listDetailTitle">专户清单</p>
        <el-row class="toolbar searchInputWidth" style="padding-bottom: 0">
          <el-form :inline="true" :model="filterField">
            <el-form-item label="项目名称" class="row-padding-bottom">
              <el-input
                placeholder="请输入"
                clearable
                v-model="filterField.projectName"
              ></el-input>
            </el-form-item>
            <el-form-item label="专户账号" class="row-padding-bottom">
              <el-input
                placeholder="请输入"
                clearable
                v-model="filterField.account"
              ></el-input>
            </el-form-item>
            <el-form-item label="是否签约" class="row-padding-bottom">
              <el-input
                placeholder="请输入"
                clearable
                v-model="filterField.isSign"
              ></el-input>
            </el-form-item>
            <el-form-item>
              <el-button
                type="primary"
                icon="icon iconfont iconchazhao1"
                class="commonBtn"
                v-sdc
                @click="searchList"
              ></el-button>
            </el-form-item>
            <el-form-item>
              <el-button
                type="primary"
                icon="icon iconfont icontianjia"
                class="commonBtn titleBtn"
                v-sdc
                @click="roleAdd"
                v-show="isShowAdd && !isBankSiteId"
                >添加</el-button
              >
            </el-form-item>
          </el-form>
        </el-row>
        <el-table
          :data="detailList"
          size="small"
          :header-cell-style="{ background: '#F5F7FB', color: '#333' }"
        >
          <el-table-column
            prop="projectName"
            label="项目名称"
            align="center"
            :formatter="formatTd"
          ></el-table-column>
          <el-table-column
            prop="account"
            label="专户账号"
            align="center"
            :formatter="formatTd"
          ></el-table-column>
          <el-table-column prop="signed" label="是否签约" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.signed == 1">是</span>
              <span v-else>否</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="balance"
            label="余额(万元)"
            align="center"
            :formatter="dateForma"
          ></el-table-column>
        </el-table>
        <Pagination
          ref="pagination"
          @getList="getTableList"
          :filterField="filterField"
          :requestUrl="requestUrl"
        ></Pagination>
        <!-- 修改弹窗 -->
        <el-dialog
          title="修改"
          class="dialogDetail"
          :visible.sync="isShowEdit"
          width="716px"
          :modal-append-to-body="false"
        >
        </el-dialog>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'BankSiteDetail',
  data() {
    return {
      titleText: '网点详情',
      filterField: {
        projectName: '',
        account: '',
        isSign: '',
      },
      loading: false,
      tableList: [],
      isShow: false,
      requestUrl: '/api-acc/accountbank/expand/list',
      isShowEdit: false,
    }
  },
  methods: {
    getTableList(data) {
      this.tableList = data
      this.loading = false
      if (this.tableList.length < 1) {
        this.isShow = true
      }
    },
  },
}
</script>
<style lang="less" scoped>
.listDetailTitle {
  height: 24px;
  line-height: 24px;
  font-size: 14px;
  font-weight: bold;
  border-left: 3px solid #009588;
  padding-left: 20px;
  margin: 14px 0;
}
.listDetailInfo {
  padding: 0 23px;
  .el-col {
    height: 42px;
    line-height: 42px;
  }
}
</style>
